<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">
<!--

	$(document).ready(function() { /*jQuery*/
		$("#board-recommand-count").click(function() {
			AJAX.addBoardRecommandCount();
		});
	});	


-->
</script>
<div class="viewDocument">
	<!-- <h3>유니버스 > 유니버스일반</h3> -->﻿
	<!-- 글 내용 보여주기 -->
	<div class="boardRead">
		<div class="originalContent">
			<div class="readHeader">
				<div class="titleAndUser">
					<div class="title">
						${board.title}
					</div>
					<div class="userInfo">
						<div class="author">
							<span class="member_86008033">${board.writer}</span>
						</div>
					</div>
					<div class="clear"></div>
				</div>

				<div class="dateAndCount">
					<div class="uri" title="게시글 주소">
						<a href="${pageContext.request.contextPath}/boardContent.do?boardSeq=${board.boardSeq}&categoryCode=${categoryCode}">${pageContext.request.contextPath}/boardContent.do?boardSeq=${board.boardSeq}&categoryCode=${categoryCode}</a>
					</div>
					<div class="date" title="등록일">
						<strong>${board.regDate}</strong>
					</div>
				</div>
			</div>

			<div class="readBody">
				<div class="contentBody">
					<div class=" xe_content">
						${board.content}
					</div>
					<div class="wgtRv addon_addvote">
						<span class="btnRv btnRo">
							<button id="board-recommand-count" type="button" 
								class="btn_voted btn btn-primary">
								<span class="tx">추천</span><span class="num">${recommandCount}</span>
							</button>
							</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="btnRv btnRx">
							<button
								type="button" class="btn_blamed btn btn-danger">
								<span class="tx">중복</span><span class="num">0</span>
							</button>
						</span>
					</div>
				</div>


				<div class="fileAttached">
					<ul>
						<c:forEach var="attachmentFile" items="${board.attachmentFile}">
						<li><a
							href="${pageContext.request.contextPath}/fileDownload.do?boardSeq=${board.boardSeq}&fileSeq=${attachmentFile.fileSeq}">${attachmentFile.fileName}
								(${attachmentFile.fileSize})</a></li>
						</c:forEach>
					</ul>
					<div class="clear"></div>
				</div>
			</div>

			<!-- e : 기사 본문 -->

			<!-- 목록, 수정/삭제 버튼 -->
			<div class="contentButton">
				<a href="${pageContext.request.contextPath}/writeAndUpdateForm.do?boardSeq=${board.boardSeq}&categoryCode=${categoryCode}" class="btn btn-warning">
					글수정
				</a>
				<a href="${pageContext.request.contextPath}/boardDelete.do?boardSeq=${board.boardSeq}&categoryCode=${categoryCode}" class="btn btn-danger">
					글삭제
				</a>
				<!-- <a href="#413109774" class="procDocumentDeclare button">
					<span>
						<font color="#EE2222">신고</font>
					</span>
				</a>  -->
				<a href="${pageContext.request.contextPath}/category.do?categoryCode=universe" class="btn btn-info">
					<span>목록</span>
				</a>
			</div>

		</div>
		<!-- 엮인글 -->

		<div class="actionTrail">
			<a href="#rp">
				<span id="commentCount">댓글 <span class="cnt">${count}</span>개가 달렸습니다</span>
			</a>
		</div>
		<!-- 댓글 -->
		<div class="replyBox">
			<c:forEach var="reply" items="${replies}">

				<div class="replyItem ">
					<div class="date">
						<strong>${reply.regDate}</strong>
					</div>

					<div class="author">
						<div class="member">
							<img
								src="${pageContext.request.contextPath}/images/req.png"
								alt="[레벨:1]" title="포인트:222잉여력 (71%), 레벨:1/30"
								style="vertical-align: middle; margin-right: 3px;"/>${reply.writer}
							<a href="#" class="btn btn-warning" title="수정">&nbsp;<span>수정</span></a> 
							<a href="${pageContext.request.contextPath}/boardReplyDelete.do?boardReplySeq=${reply.boardReplySeq}&boardSeq=${board.boardSeq}&categoryCode=${categoryCode}"
							class="btn btn-danger" title="삭제">&nbsp;<span>삭제</span></a>
						</div>
					</div>

					<div class="clear"></div>

					<div class="replyContent">
						<!--BeforeComment(413464231,0)-->
						<div class="commentContent">${reply.content}</div>
						<!--AfterComment(413464231,0)-->
						<div class="clear"></div>
					</div>
				</div>
			</c:forEach>
		</div>

		<div class="comment">
			<!-- commentList close -->
			<form method="post" action="${pageContext.request.contextPath}/replyWriteAndUpdateSubmit.do" style="margin: 0">
				<div class="commentWrite">
					<p class="writerInfo">
						<label for="name">Name</label>
						<input type="text" name="writer" value="">
					</p>
					<!-- <p class="writerInfo">
						<label for="password">Password</label>
						<input type="password" maxlength="8" name="password" value="">
					</p>
					<p class="writerInfo">
						<label for="homepage">Homepage</label>
						<input type="text" class="homepage" name="homepage" value="http://">
					</p>
					<p class="secretWrap">
						<input type="checkbox" name="secret" class="checkbox">
						<label for="secret"> 비밀글 </label>
					</p> -->
					<p class="clear">
						<textarea name="content" rows="10" cols="50"></textarea>
					</p>
					<p>
						<input type="hidden" id="board-seq" name="boardSeq" value="${board.boardSeq}" />
						<input type="hidden" name="categoryCode" value="${categoryCode}" />
						<input type="submit" value="댓글 달기" class="btn btn-primary" />
					</p>
				</div><!-- commentWrite close -->
			</form>
		</div>
	</div>
</div>

<div id="dialog" class="selector" >포스트잇 </div>
  
 <script>
//  $("#dialog").dialog();
//  $("#dialog").dialog({ zIndex: 3999 });
//	$("#dialog").dialog({ modal: true });
//  $("#dialog").dialog({ stack: true });
//  $("#dialog").dialog({ show: 'slide' });
//  $("#dialog").dialog({ hide: 'slide' });
//  $("#dialog").dialog({ draggable: false });

  $("#dialog").dialog({
  			resizable: false,
			height:200,
			modal: true,
//			zIndex:9000,
			title: "확인창",
			buttons: {
				"확인": function() {
					$( this ).dialog( "close" );
				},
				"Cancel": function() {
					$( this ).dialog( "close" );
				}
			}	
  });

	
 </script>